import Vue from 'vue'
import Router from 'vue-router'

const Defaut = () => import('@/layout/Defaut')
const Index = () => import('@/pages/Index')
const List = () => import('@/pages/List')
const Single = () => import('@/pages/Single')
const ConnectWifi = () => import('@/pages/ConnectWifi')
const DoScanInfo = () => import('@/pages/DoScanInfo')
const Family = () => import('@/pages/Family')
const History = () => import('@/pages/History')
const Introduction = () => import('@/pages/Introduction')
const MyList = () => import('@/pages/MyList')
const Setting = () => import('@/pages/Setting')
const Sinvoice = () => import('@/pages/Sinvoice')
const SinvoiceWifi = () => import('@/pages/SinvoiceWifi')
const IntroductionVoice = () => import('@/pages/IntroductionVoice')

Vue.use(Router)

export default new Router(
  {
    mode: 'history',
    routes: [
      {
        // 百宝袋首页
        path: '/',
        name: 'index',
        component: Index
      },
      {
        //介绍
        path: '/introduction',
        name: 'introduction',
        component: Introduction
      },
      {
        path: '',
        component: Defaut,
        children: [{
          //歌曲列表
          path: '/list',
          name: 'list',
          component: List
        },
          {
            //试听界面
            path: '/single',
            name: 'single',
            component: Single
          },
          {
            //试听界面
            path: '/connectwifi',
            name: 'connectwifi',
            component: ConnectWifi
          },
          {
            //绑定设备
            path: '/doscaninfo',
            name: 'doscaninfo',
            component: DoScanInfo
          },
          {
            //家庭成员
            path: '/family',
            name: 'family',
            component: Family
          },
          {
            //历史点播
            path: '/history',
            name: 'history',
            component: History
          },
          {
            //我的
            path: '/mylist',
            name: 'mylist',
            component: MyList
          },
          {
            //设置
            path: '/setting',
            name: 'setting',
            component: Setting
          },
          {
            //声波配网
            path: '/sinvoice',
            name: 'sinvoice',
            component: Sinvoice
          },
          {
            //声波配网wifi
            path: '/sinvoicewifi',
            name: 'sinvoicewifi',
            component: SinvoiceWifi
          },
          {
            //声波配网wifi
            path: '/introductionvoice',
            name: 'introductionvoice',
            component: IntroductionVoice
          },


        ]
      }

    ]
  })
